package com.hqyj.controller;

import com.hqyj.pojo.R;
import com.hqyj.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    EmailService emailService;

    //发送邮件
    @PostMapping("/email")
    public R send(String toEmail,String title,String content){
        return emailService.send(toEmail,title,content);
    }
}
